package snmpstatistics;

import org.snmp4j.smi.Integer32;

public enum EnableAuthenTraps {
	enabled("Abilitato"),
	disabled("Disabilitato");
	
	private String description = null;
	
	private EnableAuthenTraps(String description) {
		this.description = description;
	}

	public int getValue() {
		switch (this) {
		case enabled: default: return 1;
		case disabled: return 2;
		}
	}
	
	@Override
	public String toString() {
		return description;
	}
	
	public Integer32 toVariable() {
		return new Integer32(getValue());
	}
	
	public static EnableAuthenTraps fromVariable(Integer32 variable) {
		return fromInt(variable.getValue());
	}
	
	public static EnableAuthenTraps fromInt(int value) {
		switch (value) {
		case 1: default: return enabled;
		case 2: return disabled;
		}
	}
}
